package com.qf.fcy.youshare.fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.qf.fcy.youshare.Constants;
import com.qf.fcy.youshare.R;

/**
 * Created with IntelliJ IDEA.
 * User: Alex[FR]
 * Date: 2015/2/4
 * Email: alex_fcy@163.com
 */

/**
 * 教程界面显示图片的部分，这个Fragment通过传递的参数显示不同的教程界面
 */
public class TutorialImageFragment extends Fragment {
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // 可以获取 Fragment 的参数
        Bundle arguments = getArguments();
        int layoutId = R.layout.fragment_tutorial_image_1;
        if (arguments != null) {
            layoutId = arguments.getInt(Constants.ARG_TUTORIAL_IMAGE_LAYOUT_ID,R.layout.fragment_tutorial_image_1);
        }

        return inflater.inflate(layoutId, container, false);
    }
}